<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserAdmTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('userAdm', function (Blueprint $table) {
            $table->increments('id');
            $table->string('mobile')->comment('手机号码')->unique();
            $table->string('passWord')->comment('密码');
            $table->string('apiToken')->unique();
            $table->tinyInteger('status')->default('0')->comment('是否第一次登陆,默认为第一次登陆');
            $table->tinyInteger('type')->comment('设备类型(1为Ipad,2为PC)');
            $table->integer('createdAt')->comment('创建时间');
            $table->integer('updatedAt')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `userAdm` comment '用户表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('userAdm');
    }
}
